import React, { Component } from 'react';
import './index.css'
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as getRecommend from "../../store/actionCreators";
import Public from '../../components/Public'
import Footer from '../../components/Footer';
import Nav from '../../components/Nav';
import Banner from '../../components/Banner'
class Man extends Component {
  componentDidMount() {
    const a='boy_recommend_v0722'
    this.props.getRecommend(a)  
  }
  render() {
    const { baijin, quanben,banner} = this.props.list
    return (
      <div className='man-box'>
        <Banner data={banner} />
        <Nav />
        <Public data={baijin} title={'白金作品'}/>
        <Public data={quanben} title={'都市玄幻'}/>
        <Footer />
      </div>
    );
  }
}

function mapStateToProps(state) {
  return{
    list:state.recommend,
  }
}
function mapDispatchToProps(dispatch) {
  return {
    ...bindActionCreators(getRecommend, dispatch)
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(Man);;